import time

from library import respberrypi

"""
原理：
高电平时候，COM和NC连通，这时候led接地线打通，此时led灯亮
低电平时候，COM和NC断开，这时候led接地线断开，此时led灯关
"""
if __name__ == '__main__':
    DATA_PIN = 4
    respberrypi.gpio_init(out_channels=[[DATA_PIN, respberrypi.SIG_LOW]])
    respberrypi.gpio_output(DATA_PIN, respberrypi.SIG_HIGH)
    time.sleep(5)
    respberrypi.gpio_output(DATA_PIN, respberrypi.SIG_LOW)
    time.sleep(5)
    respberrypi.gpio_output(DATA_PIN, respberrypi.SIG_HIGH)
    time.sleep(5)
